namespace QMVnSoft.Invoices
{
    using QMVnSoft;
    using QMVnSoft.Controls;
    using QMVnSoft.Controls.ChildGridControls;
    using QMVnSoft.DAL;
    using System;
    using System.ComponentModel;
    using System.Drawing;
    using System.Windows.Forms;

    public class FormCTNBViewer : FormHistoryViewer
    {
        private OptionColumn Column1;
        private NumericColumn Column10;
        private SearchColumn Column11;
        private SearchColumn Column12;
        private NumericColumn Column13;
        private NumericColumn Column14;
        private NumericColumn Column15;
        private NumericColumn Column16;
        private SearchColumn Column2;
        private DataGridViewTextBoxColumn Column3;
        private OptionColumn Column4;
        private SearchColumn Column5;
        private DateColumn Column6;
        private SearchColumn Column7;
        private SearchColumn Column8;
        private NumericColumn Column9;
        private IContainer components;
        public GridDetail grdDetail;
        private LabelControl lblDesc_EN;
        private LabelControl lblDia_Chi;
        private LabelControl lblDien_Giai;
        private LabelControl lblMa_Bp;
        private LabelControl lblMa_Dt;
        private LabelControl lblMa_Hd;
        private LabelControl lblMa_Tte;
        private LabelControl lblOng_Ba;
        private LabelControl lblTTien_Nt;
        private CTNBDataAccess oMethod = new CTNBDataAccess();
        private TextControl txtDesc_EN;
        private TextControl txtDia_Chi;
        private TextControl txtDien_Giai;
        private TextSearch txtMa_Bp;
        private TextSearch txtMa_Dt;
        private TextSearch txtMa_Hd;
        private TextOption txtMa_Tte;
        private TextControl txtOng_Ba;
        private TextControl txtTen_Bp;
        private TextControl txtTen_Dt;
        private TextControl txtTen_Hd;
        private TextNumeric txtTTien;
        private TextNumeric txtTTien_Nt;
        private TextNumeric txtTy_Gia;

        public FormCTNBViewer()
        {
            this.InitializeComponent();
        }

        protected override void Dispose(bool disposing)
        {
            if (disposing && (this.components != null))
            {
                this.components.Dispose();
            }
            base.Dispose(disposing);
        }

        private void InitializeComponent()
        {
            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FormCTNBViewer));
            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle();
            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle();
            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle();
            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle7 = new System.Windows.Forms.DataGridViewCellStyle();
            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle8 = new System.Windows.Forms.DataGridViewCellStyle();
            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle9 = new System.Windows.Forms.DataGridViewCellStyle();
            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle10 = new System.Windows.Forms.DataGridViewCellStyle();
            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle11 = new System.Windows.Forms.DataGridViewCellStyle();
            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle12 = new System.Windows.Forms.DataGridViewCellStyle();
            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle13 = new System.Windows.Forms.DataGridViewCellStyle();
            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle14 = new System.Windows.Forms.DataGridViewCellStyle();
            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle15 = new System.Windows.Forms.DataGridViewCellStyle();
            this.txtTTien_Nt = new QMVnSoft.Controls.TextNumeric();
            this.txtTTien = new QMVnSoft.Controls.TextNumeric();
            this.grdDetail = new QMVnSoft.Controls.GridDetail();
            this.Column1 = new QMVnSoft.Controls.ChildGridControls.OptionColumn();
            this.Column2 = new QMVnSoft.Controls.ChildGridControls.SearchColumn();
            this.Column7 = new QMVnSoft.Controls.ChildGridControls.SearchColumn();
            this.Column8 = new QMVnSoft.Controls.ChildGridControls.SearchColumn();
            this.Column12 = new QMVnSoft.Controls.ChildGridControls.SearchColumn();
            this.Column3 = new System.Windows.Forms.DataGridViewTextBoxColumn();
            this.Column4 = new QMVnSoft.Controls.ChildGridControls.OptionColumn();
            this.Column11 = new QMVnSoft.Controls.ChildGridControls.SearchColumn();
            this.Column5 = new QMVnSoft.Controls.ChildGridControls.SearchColumn();
            this.Column6 = new QMVnSoft.Controls.ChildGridControls.DateColumn();
            this.Column9 = new QMVnSoft.Controls.ChildGridControls.NumericColumn();
            this.Column10 = new QMVnSoft.Controls.ChildGridControls.NumericColumn();
            this.Column13 = new QMVnSoft.Controls.ChildGridControls.NumericColumn();
            this.Column14 = new QMVnSoft.Controls.ChildGridControls.NumericColumn();
            this.Column15 = new QMVnSoft.Controls.ChildGridControls.NumericColumn();
            this.Column16 = new QMVnSoft.Controls.ChildGridControls.NumericColumn();
            this.txtDesc_EN = new QMVnSoft.Controls.TextControl();
            this.txtDien_Giai = new QMVnSoft.Controls.TextControl();
            this.txtDia_Chi = new QMVnSoft.Controls.TextControl();
            this.txtOng_Ba = new QMVnSoft.Controls.TextControl();
            this.txtTen_Dt = new QMVnSoft.Controls.TextControl();
            this.txtTen_Hd = new QMVnSoft.Controls.TextControl();
            this.txtTen_Bp = new QMVnSoft.Controls.TextControl();
            this.lblDesc_EN = new QMVnSoft.Controls.LabelControl();
            this.lblTTien_Nt = new QMVnSoft.Controls.LabelControl();
            this.txtMa_Dt = new QMVnSoft.Controls.TextSearch();
            this.lblDien_Giai = new QMVnSoft.Controls.LabelControl();
            this.lblDia_Chi = new QMVnSoft.Controls.LabelControl();
            this.lblOng_Ba = new QMVnSoft.Controls.LabelControl();
            this.lblMa_Dt = new QMVnSoft.Controls.LabelControl();
            this.txtMa_Hd = new QMVnSoft.Controls.TextSearch();
            this.lblMa_Hd = new QMVnSoft.Controls.LabelControl();
            this.txtMa_Bp = new QMVnSoft.Controls.TextSearch();
            this.lblMa_Bp = new QMVnSoft.Controls.LabelControl();
            this.txtTy_Gia = new QMVnSoft.Controls.TextNumeric();
            this.lblMa_Tte = new QMVnSoft.Controls.LabelControl();
            this.txtMa_Tte = new QMVnSoft.Controls.TextOption();
            ((System.ComponentModel.ISupportInitialize)(this.grdDetail)).BeginInit();
            this.SuspendLayout();
            // 
            // lblPhan_Loai
            // 
            this.lblPhan_Loai.Location = new System.Drawing.Point(12, 514);
            // 
            // txtMa_Loai1
            // 
            this.txtMa_Loai1.Location = new System.Drawing.Point(99, 511);
            this.txtMa_Loai1.TabIndex = 19;
            // 
            // txtMa_Loai2
            // 
            this.txtMa_Loai2.Location = new System.Drawing.Point(327, 511);
            this.txtMa_Loai2.TabIndex = 20;
            // 
            // txtMa_Loai3
            // 
            this.txtMa_Loai3.Location = new System.Drawing.Point(555, 511);
            this.txtMa_Loai3.TabIndex = 21;
            // 
            // txtTTien_Nt
            // 
            this.txtTTien_Nt.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
            this.txtTTien_Nt.BackColor = System.Drawing.Color.White;
            this.txtTTien_Nt.Enabled = false;
            this.txtTTien_Nt.Font = new System.Drawing.Font("Arial", 8.25F);
            this.txtTTien_Nt.ForeColor = System.Drawing.Color.Black;
            this.txtTTien_Nt.Location = new System.Drawing.Point(601, 490);
            this.txtTTien_Nt.Name = "txtTTien_Nt";
            this.txtTTien_Nt.NumericValue = new decimal(new int[] {
            0,
            0,
            0,
            0});
            this.txtTTien_Nt.OldValue = null;
            this.txtTTien_Nt.Size = new System.Drawing.Size(90, 20);
            this.txtTTien_Nt.TabIndex = 85;
            this.txtTTien_Nt.TextAlign = System.Windows.Forms.HorizontalAlignment.Right;
            this.txtTTien_Nt.UserTextNumericFormat  = QMVnSoft.AppInstance.TextNumericFormat.ForeignAmount;
            this.txtTTien_Nt.Value = ((object)(resources.GetObject("txtTTien_Nt.Value")));
            // 
            // txtTTien
            // 
            this.txtTTien.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
            this.txtTTien.BackColor = System.Drawing.Color.White;
            this.txtTTien.Enabled = false;
            this.txtTTien.Font = new System.Drawing.Font("Arial", 8.25F);
            this.txtTTien.ForeColor = System.Drawing.Color.Black;
            this.txtTTien.Location = new System.Drawing.Point(692, 490);
            this.txtTTien.Name = "txtTTien";
            this.txtTTien.NumericValue = new decimal(new int[] {
            0,
            0,
            0,
            0});
            this.txtTTien.OldValue = null;
            this.txtTTien.Size = new System.Drawing.Size(90, 20);
            this.txtTTien.TabIndex = 86;
            this.txtTTien.TextAlign = System.Windows.Forms.HorizontalAlignment.Right;
            this.txtTTien.UserTextNumericFormat  = QMVnSoft.AppInstance.TextNumericFormat.LocalAmount;
            this.txtTTien.Value = ((object)(resources.GetObject("txtTTien.Value")));
            // 
            // grdDetail
            // 
            this.grdDetail.AllowUserToAddRows = false;
            this.grdDetail.AllowUserToDeleteRows = false;
            this.grdDetail.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
                        | System.Windows.Forms.AnchorStyles.Left)
                        | System.Windows.Forms.AnchorStyles.Right)));
            this.grdDetail.CheckAutoSize = true;
            this.grdDetail.CheckColor = false;
            this.grdDetail.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
            this.grdDetail.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
            this.Column1,
            this.Column2,
            this.Column7,
            this.Column8,
            this.Column12,
            this.Column3,
            this.Column4,
            this.Column11,
            this.Column5,
            this.Column6,
            this.Column9,
            this.Column10,
            this.Column13,
            this.Column14,
            this.Column15,
            this.Column16});
            this.grdDetail.FirstColumnIndex = 1;
            this.grdDetail.Font = new System.Drawing.Font("Arial", 8.25F);
            this.grdDetail.Location = new System.Drawing.Point(0, 159);
            this.grdDetail.Name = "grdDetail";
            this.grdDetail.Size = new System.Drawing.Size(794, 325);
            this.grdDetail.TabIndex = 15;
            // 
            // Column1
            // 
            this.Column1.DataPropertyName = "No_Co";
            dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
            this.Column1.DefaultCellStyle = dataGridViewCellStyle1;
            this.Column1.DisabledForeColor = System.Drawing.Color.Blue;
            this.Column1.HeaderText = "Ps";
            this.Column1.InputMask = "N,C";
            this.Column1.Name = "Column1";
            this.Column1.ReadOnly = true;
            this.Column1.Resizable = System.Windows.Forms.DataGridViewTriState.False;
            this.Column1.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
            this.Column1.UserTextLength  = QMVnSoft.AppInstance.TextControlLength.None;
            this.Column1.UserTrimMode  = QMVnSoft.AppInstance.TextControlTrimMode.Right;
            this.Column1.Width = 20;
            // 
            // Column2
            // 
            this.Column2.DataPropertyName = "Tk";
            dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
            this.Column2.DefaultCellStyle = dataGridViewCellStyle2;
            this.Column2.DestinationFields = "Ten_Tk";
            this.Column2.DisabledForeColor = System.Drawing.Color.Blue;
            this.Column2.EmptyIsValid = true;
            this.Column2.FirstFilter = "Loai_Tk = \'C\'";
            this.Column2.HeaderText = "Tài khoản";
            this.Column2.Name = "Column2";
            this.Column2.ReadOnly = true;
            this.Column2.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
            this.Column2.SourceFields = "Ten_Tk";
            this.Column2.TableName = "DMTK";
            this.Column2.UserTextLength  = QMVnSoft.AppInstance.TextControlLength.ItemCode;
            this.Column2.UserTrimMode  = QMVnSoft.AppInstance.TextControlTrimMode.All;
            this.Column2.Width = 30;
            // 
            // Column7
            // 
            this.Column7.DataPropertyName = "Ma_Bp";
            dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
            this.Column7.DefaultCellStyle = dataGridViewCellStyle3;
            this.Column7.DestinationFields = "Ten_Bp";
            this.Column7.DisabledForeColor = System.Drawing.Color.Blue;
            this.Column7.EmptyIsValid = true;
            this.Column7.HeaderText = "Bộ phận";
            this.Column7.Name = "Column7";
            this.Column7.ReadOnly = true;
            this.Column7.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
            this.Column7.SourceFields = "Ten_Bp";
            this.Column7.TableName = "DMBP";
            this.Column7.UserTextLength  = QMVnSoft.AppInstance.TextControlLength.ItemCode;
            this.Column7.UserTrimMode  = QMVnSoft.AppInstance.TextControlTrimMode.All;
            this.Column7.Width = 40;
            // 
            // Column8
            // 
            this.Column8.DataPropertyName = "Ma_Hd";
            dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
            this.Column8.DefaultCellStyle = dataGridViewCellStyle4;
            this.Column8.DestinationFields = "Ten_Hd";
            this.Column8.DisabledForeColor = System.Drawing.Color.Blue;
            this.Column8.EmptyIsValid = true;
            this.Column8.HeaderText = "Hợp đồng";
            this.Column8.Name = "Column8";
            this.Column8.ReadOnly = true;
            this.Column8.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
            this.Column8.SourceFields = "Ten_Hd";
            this.Column8.TableName = "DMHD";
            this.Column8.UserTextLength  = QMVnSoft.AppInstance.TextControlLength.ItemCode;
            this.Column8.UserTrimMode  = QMVnSoft.AppInstance.TextControlTrimMode.All;
            this.Column8.Width = 40;
            // 
            // Column12
            // 
            this.Column12.DataPropertyName = "Ma_Vt";
            dataGridViewCellStyle5.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
            this.Column12.DefaultCellStyle = dataGridViewCellStyle5;
            this.Column12.DestinationFields = "Ten_Vt, Dvt";
            this.Column12.DisabledForeColor = System.Drawing.Color.Blue;
            this.Column12.FirstFilter = "Is_Stop = \'1\'";
            this.Column12.HeaderText = "Vật tư";
            this.Column12.Name = "Column12";
            this.Column12.ReadOnly = true;
            this.Column12.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
            this.Column12.SourceFields = "Ten_Vt, Dvt";
            this.Column12.TableName = "DMVT";
            this.Column12.UserTextLength  = QMVnSoft.AppInstance.TextControlLength.ItemCode;
            this.Column12.UserTrimMode  = QMVnSoft.AppInstance.TextControlTrimMode.All;
            this.Column12.Width = 40;
            // 
            // Column3
            // 
            this.Column3.DataPropertyName = "Ten_Vt";
            this.Column3.HeaderText = "Tên vật tư";
            this.Column3.Name = "Column3";
            this.Column3.ReadOnly = true;
            this.Column3.Width = 136;
            // 
            // Column4
            // 
            this.Column4.DataPropertyName = "Dvt";
            dataGridViewCellStyle6.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
            this.Column4.DefaultCellStyle = dataGridViewCellStyle6;
            this.Column4.DisabledForeColor = System.Drawing.Color.Blue;
            this.Column4.HeaderText = "Đvt";
            this.Column4.Name = "Column4";
            this.Column4.ReadOnly = true;
            this.Column4.Resizable = System.Windows.Forms.DataGridViewTriState.True;
            this.Column4.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
            this.Column4.UserTextLength  = QMVnSoft.AppInstance.TextControlLength.None;
            this.Column4.UserTrimMode  = QMVnSoft.AppInstance.TextControlTrimMode.Right;
            this.Column4.Width = 30;
            // 
            // Column11
            // 
            this.Column11.DataPropertyName = "Ma_Kho";
            dataGridViewCellStyle7.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
            this.Column11.DefaultCellStyle = dataGridViewCellStyle7;
            this.Column11.DestinationFields = "Ten_Kho";
            this.Column11.DisabledForeColor = System.Drawing.Color.Blue;
            this.Column11.HeaderText = "Kho";
            this.Column11.Name = "Column11";
            this.Column11.ReadOnly = true;
            this.Column11.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
            this.Column11.SourceFields = "Ten_Kho";
            this.Column11.TableName = "DMKHO";
            this.Column11.UserTextLength  = QMVnSoft.AppInstance.TextControlLength.ItemCode;
            this.Column11.UserTrimMode  = QMVnSoft.AppInstance.TextControlTrimMode.All;
            this.Column11.Width = 40;
            // 
            // Column5
            // 
            this.Column5.DataPropertyName = "Lo_Hang";
            dataGridViewCellStyle8.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
            this.Column5.DefaultCellStyle = dataGridViewCellStyle8;
            this.Column5.DisabledForeColor = System.Drawing.Color.Blue;
            this.Column5.HeaderText = "Lô hàng";
            this.Column5.Name = "Column5";
            this.Column5.ReadOnly = true;
            this.Column5.Resizable = System.Windows.Forms.DataGridViewTriState.True;
            this.Column5.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
            this.Column5.UserTextLength  = QMVnSoft.AppInstance.TextControlLength.ItemCode;
            this.Column5.UserTrimMode  = QMVnSoft.AppInstance.TextControlTrimMode.Right;
            this.Column5.Width = 40;
            // 
            // Column6
            // 
            this.Column6.DataPropertyName = "Han_Dung";
            dataGridViewCellStyle9.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
            this.Column6.DefaultCellStyle = dataGridViewCellStyle9;
            this.Column6.HeaderText = "Hạn dùng";
            this.Column6.Name = "Column6";
            this.Column6.ReadOnly = true;
            this.Column6.Resizable = System.Windows.Forms.DataGridViewTriState.True;
            this.Column6.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
            this.Column6.Width = 62;
            // 
            // Column9
            // 
            this.Column9.DataPropertyName = "H_Luong";
            dataGridViewCellStyle10.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
            this.Column9.DefaultCellStyle = dataGridViewCellStyle10;
            this.Column9.HeaderText = "Hàm lượng";
            this.Column9.Name = "Column9";
            this.Column9.ReadOnly = true;
            this.Column9.Resizable = System.Windows.Forms.DataGridViewTriState.True;
            this.Column9.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
            this.Column9.UserTextNumericFormat  = QMVnSoft.AppInstance.TextNumericFormat.Percent;
            this.Column9.Width = 26;
            // 
            // Column10
            // 
            this.Column10.DataPropertyName = "Do_Am_PT";
            dataGridViewCellStyle11.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
            this.Column10.DefaultCellStyle = dataGridViewCellStyle11;
            this.Column10.HeaderText = "Độ ẩm";
            this.Column10.Name = "Column10";
            this.Column10.ReadOnly = true;
            this.Column10.Resizable = System.Windows.Forms.DataGridViewTriState.True;
            this.Column10.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
            this.Column10.UserTextNumericFormat  = QMVnSoft.AppInstance.TextNumericFormat.Percent;
            this.Column10.Width = 26;
            // 
            // Column13
            // 
            this.Column13.DataPropertyName = "Do_Con_PT";
            dataGridViewCellStyle12.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
            this.Column13.DefaultCellStyle = dataGridViewCellStyle12;
            this.Column13.FillWeight = 90F;
            this.Column13.HeaderText = "Độ cồn";
            this.Column13.Name = "Column13";
            this.Column13.ReadOnly = true;
            this.Column13.Resizable = System.Windows.Forms.DataGridViewTriState.True;
            this.Column13.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
            this.Column13.UserTextNumericFormat  = QMVnSoft.AppInstance.TextNumericFormat.Percent;
            this.Column13.Width = 26;
            // 
            // Column14
            // 
            this.Column14.DataPropertyName = "So_Luong9";
            dataGridViewCellStyle13.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
            this.Column14.DefaultCellStyle = dataGridViewCellStyle13;
            this.Column14.FillWeight = 90F;
            this.Column14.HeaderText = "Số lượng";
            this.Column14.Name = "Column14";
            this.Column14.ReadOnly = true;
            this.Column14.Resizable = System.Windows.Forms.DataGridViewTriState.True;
            this.Column14.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
            this.Column14.UserTextNumericFormat  = QMVnSoft.AppInstance.TextNumericFormat.Quantity;
            this.Column14.Width = 60;
            this.Column14.ZeroIsValid = true;
            // 
            // Column15
            // 
            this.Column15.DataPropertyName = "Gia_Nt9";
            dataGridViewCellStyle14.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
            this.Column15.DefaultCellStyle = dataGridViewCellStyle14;
            this.Column15.HeaderText = "Đơn giá";
            this.Column15.Name = "Column15";
            this.Column15.ReadOnly = true;
            this.Column15.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
            this.Column15.UserTextNumericFormat  = QMVnSoft.AppInstance.TextNumericFormat.ForeignPrice;
            this.Column15.Width = 65;
            this.Column15.ZeroIsValid = true;
            // 
            // Column16
            // 
            this.Column16.DataPropertyName = "Tien_Nt";
            dataGridViewCellStyle15.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
            this.Column16.DefaultCellStyle = dataGridViewCellStyle15;
            this.Column16.HeaderText = "Thành tiền";
            this.Column16.Name = "Column16";
            this.Column16.ReadOnly = true;
            this.Column16.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
            this.Column16.UserTextNumericFormat  = QMVnSoft.AppInstance.TextNumericFormat.ForeignAmount;
            this.Column16.Width = 70;
            this.Column16.ZeroIsValid = true;
            // 
            // txtDesc_EN
            // 
            this.txtDesc_EN.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
            this.txtDesc_EN.CheckTextSearched = false;
            this.txtDesc_EN.DisabledForeColor = System.Drawing.Color.Blue;
            this.txtDesc_EN.Font = new System.Drawing.Font("Arial", 8.25F);
            this.txtDesc_EN.Location = new System.Drawing.Point(487, 133);
            this.txtDesc_EN.MaxLength = 254;
            this.txtDesc_EN.Name = "txtDesc_EN";
            this.txtDesc_EN.OldValue = null;
            this.txtDesc_EN.ReadOnly = true;
            this.txtDesc_EN.Size = new System.Drawing.Size(295, 20);
            this.txtDesc_EN.TabIndex = 14;
            this.txtDesc_EN.UserTextLength  = QMVnSoft.AppInstance.TextControlLength.InvoiceDescription;
            this.txtDesc_EN.UserTrimMode  = QMVnSoft.AppInstance.TextControlTrimMode.Right;
            this.txtDesc_EN.Value = ((object)(resources.GetObject("txtDesc_EN.Value")));
            // 
            // txtDien_Giai
            // 
            this.txtDien_Giai.CheckTextSearched = false;
            this.txtDien_Giai.DisabledForeColor = System.Drawing.Color.Blue;
            this.txtDien_Giai.Font = new System.Drawing.Font("Arial", 8.25F);
            this.txtDien_Giai.Location = new System.Drawing.Point(99, 133);
            this.txtDien_Giai.MaxLength = 254;
            this.txtDien_Giai.Name = "txtDien_Giai";
            this.txtDien_Giai.OldValue = null;
            this.txtDien_Giai.ReadOnly = true;
            this.txtDien_Giai.Size = new System.Drawing.Size(296, 20);
            this.txtDien_Giai.TabIndex = 13;
            this.txtDien_Giai.UserTextLength  = QMVnSoft.AppInstance.TextControlLength.InvoiceDescription;
            this.txtDien_Giai.UserTrimMode  = QMVnSoft.AppInstance.TextControlTrimMode.Right;
            this.txtDien_Giai.Value = ((object)(resources.GetObject("txtDien_Giai.Value")));
            // 
            // txtDia_Chi
            // 
            this.txtDia_Chi.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
            this.txtDia_Chi.CheckTextSearched = false;
            this.txtDia_Chi.DisabledForeColor = System.Drawing.Color.Blue;
            this.txtDia_Chi.Font = new System.Drawing.Font("Arial", 8.25F);
            this.txtDia_Chi.Location = new System.Drawing.Point(487, 112);
            this.txtDia_Chi.MaxLength = 128;
            this.txtDia_Chi.Name = "txtDia_Chi";
            this.txtDia_Chi.OldValue = null;
            this.txtDia_Chi.ReadOnly = true;
            this.txtDia_Chi.Size = new System.Drawing.Size(295, 20);
            this.txtDia_Chi.TabIndex = 12;
            this.txtDia_Chi.UserTextLength  = QMVnSoft.AppInstance.TextControlLength.ItemDescription;
            this.txtDia_Chi.UserTrimMode  = QMVnSoft.AppInstance.TextControlTrimMode.Right;
            this.txtDia_Chi.Value = ((object)(resources.GetObject("txtDia_Chi.Value")));
            // 
            // txtOng_Ba
            // 
            this.txtOng_Ba.CheckTextSearched = false;
            this.txtOng_Ba.DisabledForeColor = System.Drawing.Color.Blue;
            this.txtOng_Ba.Font = new System.Drawing.Font("Arial", 8.25F);
            this.txtOng_Ba.Location = new System.Drawing.Point(99, 112);
            this.txtOng_Ba.MaxLength = 128;
            this.txtOng_Ba.Name = "txtOng_Ba";
            this.txtOng_Ba.OldValue = null;
            this.txtOng_Ba.ReadOnly = true;
            this.txtOng_Ba.Size = new System.Drawing.Size(296, 20);
            this.txtOng_Ba.TabIndex = 11;
            this.txtOng_Ba.UserTextLength  = QMVnSoft.AppInstance.TextControlLength.ItemDescription;
            this.txtOng_Ba.UserTrimMode  = QMVnSoft.AppInstance.TextControlTrimMode.Right;
            this.txtOng_Ba.Value = ((object)(resources.GetObject("txtOng_Ba.Value")));
            // 
            // txtTen_Dt
            // 
            this.txtTen_Dt.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
                        | System.Windows.Forms.AnchorStyles.Right)));
            this.txtTen_Dt.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(194)))), ((int)(((byte)(217)))), ((int)(((byte)(247)))));
            this.txtTen_Dt.BorderStyle = System.Windows.Forms.BorderStyle.None;
            this.txtTen_Dt.CheckTextSearched = false;
            this.txtTen_Dt.DisabledForeColor = System.Drawing.Color.Blue;
            this.txtTen_Dt.Enabled = false;
            this.txtTen_Dt.Font = new System.Drawing.Font("Arial", 8.25F);
            this.txtTen_Dt.ForeColor = System.Drawing.Color.Blue;
            this.txtTen_Dt.Location = new System.Drawing.Point(223, 94);
            this.txtTen_Dt.Name = "txtTen_Dt";
            this.txtTen_Dt.OldValue = null;
            this.txtTen_Dt.Size = new System.Drawing.Size(559, 13);
            this.txtTen_Dt.TabIndex = 72;
            this.txtTen_Dt.UserTextLength  = QMVnSoft.AppInstance.TextControlLength.None;
            this.txtTen_Dt.UserTrimMode  = QMVnSoft.AppInstance.TextControlTrimMode.Right;
            this.txtTen_Dt.Value = ((object)(resources.GetObject("txtTen_Dt.Value")));
            // 
            // txtTen_Hd
            // 
            this.txtTen_Hd.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
                        | System.Windows.Forms.AnchorStyles.Right)));
            this.txtTen_Hd.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(194)))), ((int)(((byte)(217)))), ((int)(((byte)(247)))));
            this.txtTen_Hd.BorderStyle = System.Windows.Forms.BorderStyle.None;
            this.txtTen_Hd.CheckTextSearched = false;
            this.txtTen_Hd.DisabledForeColor = System.Drawing.Color.Blue;
            this.txtTen_Hd.Enabled = false;
            this.txtTen_Hd.Font = new System.Drawing.Font("Arial", 8.25F);
            this.txtTen_Hd.ForeColor = System.Drawing.Color.Blue;
            this.txtTen_Hd.Location = new System.Drawing.Point(223, 73);
            this.txtTen_Hd.Name = "txtTen_Hd";
            this.txtTen_Hd.OldValue = null;
            this.txtTen_Hd.Size = new System.Drawing.Size(559, 13);
            this.txtTen_Hd.TabIndex = 73;
            this.txtTen_Hd.UserTextLength  = QMVnSoft.AppInstance.TextControlLength.None;
            this.txtTen_Hd.UserTrimMode  = QMVnSoft.AppInstance.TextControlTrimMode.Right;
            this.txtTen_Hd.Value = ((object)(resources.GetObject("txtTen_Hd.Value")));
            // 
            // txtTen_Bp
            // 
            this.txtTen_Bp.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
                        | System.Windows.Forms.AnchorStyles.Right)));
            this.txtTen_Bp.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(194)))), ((int)(((byte)(217)))), ((int)(((byte)(247)))));
            this.txtTen_Bp.BorderStyle = System.Windows.Forms.BorderStyle.None;
            this.txtTen_Bp.CheckTextSearched = false;
            this.txtTen_Bp.DisabledForeColor = System.Drawing.Color.Blue;
            this.txtTen_Bp.Enabled = false;
            this.txtTen_Bp.Font = new System.Drawing.Font("Arial", 8.25F);
            this.txtTen_Bp.ForeColor = System.Drawing.Color.Blue;
            this.txtTen_Bp.Location = new System.Drawing.Point(223, 52);
            this.txtTen_Bp.Name = "txtTen_Bp";
            this.txtTen_Bp.OldValue = null;
            this.txtTen_Bp.Size = new System.Drawing.Size(559, 13);
            this.txtTen_Bp.TabIndex = 74;
            this.txtTen_Bp.UserTextLength  = QMVnSoft.AppInstance.TextControlLength.None;
            this.txtTen_Bp.UserTrimMode  = QMVnSoft.AppInstance.TextControlTrimMode.Right;
            this.txtTen_Bp.Value = ((object)(resources.GetObject("txtTen_Bp.Value")));
            // 
            // lblDesc_EN
            // 
            this.lblDesc_EN.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
            this.lblDesc_EN.AutoSize = true;
            this.lblDesc_EN.Font = new System.Drawing.Font("Arial", 8.25F);
            this.lblDesc_EN.Location = new System.Drawing.Point(410, 136);
            this.lblDesc_EN.Name = "lblDesc_EN";
            this.lblDesc_EN.Size = new System.Drawing.Size(71, 14);
            this.lblDesc_EN.TabIndex = 65;
            this.lblDesc_EN.Text = "Diễn giải (EN)";
            // 
            // lblTTien_Nt
            // 
            this.lblTTien_Nt.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
            this.lblTTien_Nt.AutoSize = true;
            this.lblTTien_Nt.Font = new System.Drawing.Font("Arial", 8.25F);
            this.lblTTien_Nt.Location = new System.Drawing.Point(537, 493);
            this.lblTTien_Nt.Name = "lblTTien_Nt";
            this.lblTTien_Nt.Size = new System.Drawing.Size(58, 14);
            this.lblTTien_Nt.TabIndex = 61;
            this.lblTTien_Nt.Text = "Tổng cộng";
            // 
            // txtMa_Dt
            // 
            this.txtMa_Dt.CharacterCasing = System.Windows.Forms.CharacterCasing.Upper;
            this.txtMa_Dt.CheckTextSearched = false;
            this.txtMa_Dt.DisabledForeColor = System.Drawing.Color.Empty;
            this.txtMa_Dt.EmptyIsValid = true;
            this.txtMa_Dt.FieldDisplay = "Ten_Dt";
            this.txtMa_Dt.FirstFilter = "Is_Stop = \'1\'";
            this.txtMa_Dt.Font = new System.Drawing.Font("Arial", 8.25F);
            this.txtMa_Dt.Location = new System.Drawing.Point(99, 91);
            this.txtMa_Dt.MaxLength = 32;
            this.txtMa_Dt.Name = "txtMa_Dt";
            this.txtMa_Dt.OldValue = null;
            this.txtMa_Dt.ReadOnly = true;
            this.txtMa_Dt.Size = new System.Drawing.Size(118, 20);
            this.txtMa_Dt.TabIndex = 10;
            this.txtMa_Dt.TableName = "DMDT";
            this.txtMa_Dt.TextDisplay = this.txtTen_Dt;
            this.txtMa_Dt.UserTextLength  = QMVnSoft.AppInstance.TextControlLength.ItemCode;
            this.txtMa_Dt.UserTrimMode  = QMVnSoft.AppInstance.TextControlTrimMode.All;
            this.txtMa_Dt.Value = ((object)(resources.GetObject("txtMa_Dt.Value")));
            // 
            // lblDien_Giai
            // 
            this.lblDien_Giai.AutoSize = true;
            this.lblDien_Giai.Font = new System.Drawing.Font("Arial", 8.25F);
            this.lblDien_Giai.Location = new System.Drawing.Point(12, 136);
            this.lblDien_Giai.Name = "lblDien_Giai";
            this.lblDien_Giai.Size = new System.Drawing.Size(73, 14);
            this.lblDien_Giai.TabIndex = 66;
            this.lblDien_Giai.Text = "Diễn giải (VN)";
            // 
            // lblDia_Chi
            // 
            this.lblDia_Chi.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
            this.lblDia_Chi.AutoSize = true;
            this.lblDia_Chi.Font = new System.Drawing.Font("Arial", 8.25F);
            this.lblDia_Chi.Location = new System.Drawing.Point(441, 115);
            this.lblDia_Chi.Name = "lblDia_Chi";
            this.lblDia_Chi.Size = new System.Drawing.Size(40, 14);
            this.lblDia_Chi.TabIndex = 70;
            this.lblDia_Chi.Text = "Địa chỉ";
            // 
            // lblOng_Ba
            // 
            this.lblOng_Ba.AutoSize = true;
            this.lblOng_Ba.Font = new System.Drawing.Font("Arial", 8.25F);
            this.lblOng_Ba.Location = new System.Drawing.Point(12, 115);
            this.lblOng_Ba.Name = "lblOng_Ba";
            this.lblOng_Ba.Size = new System.Drawing.Size(42, 14);
            this.lblOng_Ba.TabIndex = 71;
            this.lblOng_Ba.Text = "Ông bà";
            // 
            // lblMa_Dt
            // 
            this.lblMa_Dt.AutoSize = true;
            this.lblMa_Dt.Font = new System.Drawing.Font("Arial", 8.25F);
            this.lblMa_Dt.Location = new System.Drawing.Point(12, 94);
            this.lblMa_Dt.Name = "lblMa_Dt";
            this.lblMa_Dt.Size = new System.Drawing.Size(55, 14);
            this.lblMa_Dt.TabIndex = 69;
            this.lblMa_Dt.Text = "Đối tượng";
            // 
            // txtMa_Hd
            // 
            this.txtMa_Hd.CharacterCasing = System.Windows.Forms.CharacterCasing.Upper;
            this.txtMa_Hd.CheckTextSearched = false;
            this.txtMa_Hd.DisabledForeColor = System.Drawing.Color.Empty;
            this.txtMa_Hd.EmptyIsValid = true;
            this.txtMa_Hd.FieldDisplay = "Ten_Hd";
            this.txtMa_Hd.Font = new System.Drawing.Font("Arial", 8.25F);
            this.txtMa_Hd.FoundIsValid = true;
            this.txtMa_Hd.Location = new System.Drawing.Point(99, 70);
            this.txtMa_Hd.MaxLength = 32;
            this.txtMa_Hd.Name = "txtMa_Hd";
            this.txtMa_Hd.OldValue = null;
            this.txtMa_Hd.ReadOnly = true;
            this.txtMa_Hd.Size = new System.Drawing.Size(118, 20);
            this.txtMa_Hd.TabIndex = 9;
            this.txtMa_Hd.TableName = "DMHD";
            this.txtMa_Hd.TextDisplay = this.txtTen_Hd;
            this.txtMa_Hd.UserTextLength  = QMVnSoft.AppInstance.TextControlLength.ItemCode;
            this.txtMa_Hd.UserTrimMode  = QMVnSoft.AppInstance.TextControlTrimMode.All;
            this.txtMa_Hd.Value = ((object)(resources.GetObject("txtMa_Hd.Value")));
            // 
            // lblMa_Hd
            // 
            this.lblMa_Hd.AutoSize = true;
            this.lblMa_Hd.Font = new System.Drawing.Font("Arial", 8.25F);
            this.lblMa_Hd.Location = new System.Drawing.Point(12, 73);
            this.lblMa_Hd.Name = "lblMa_Hd";
            this.lblMa_Hd.Size = new System.Drawing.Size(54, 14);
            this.lblMa_Hd.TabIndex = 67;
            this.lblMa_Hd.Text = "Hợp đồng";
            // 
            // txtMa_Bp
            // 
            this.txtMa_Bp.CharacterCasing = System.Windows.Forms.CharacterCasing.Upper;
            this.txtMa_Bp.CheckTextSearched = false;
            this.txtMa_Bp.DisabledForeColor = System.Drawing.Color.Empty;
            this.txtMa_Bp.EmptyIsValid = true;
            this.txtMa_Bp.FieldDisplay = "Ten_Bp";
            this.txtMa_Bp.Font = new System.Drawing.Font("Arial", 8.25F);
            this.txtMa_Bp.FoundIsValid = true;
            this.txtMa_Bp.Location = new System.Drawing.Point(99, 49);
            this.txtMa_Bp.MaxLength = 32;
            this.txtMa_Bp.Name = "txtMa_Bp";
            this.txtMa_Bp.OldValue = null;
            this.txtMa_Bp.ReadOnly = true;
            this.txtMa_Bp.Size = new System.Drawing.Size(118, 20);
            this.txtMa_Bp.TabIndex = 8;
            this.txtMa_Bp.TableName = "DMBP";
            this.txtMa_Bp.TextDisplay = this.txtTen_Bp;
            this.txtMa_Bp.UserTextLength  = QMVnSoft.AppInstance.TextControlLength.ItemCode;
            this.txtMa_Bp.UserTrimMode  = QMVnSoft.AppInstance.TextControlTrimMode.All;
            this.txtMa_Bp.Value = ((object)(resources.GetObject("txtMa_Bp.Value")));
            // 
            // lblMa_Bp
            // 
            this.lblMa_Bp.AutoSize = true;
            this.lblMa_Bp.Font = new System.Drawing.Font("Arial", 8.25F);
            this.lblMa_Bp.Location = new System.Drawing.Point(12, 52);
            this.lblMa_Bp.Name = "lblMa_Bp";
            this.lblMa_Bp.Size = new System.Drawing.Size(47, 14);
            this.lblMa_Bp.TabIndex = 68;
            this.lblMa_Bp.Text = "Bộ phận";
            // 
            // txtTy_Gia
            // 
            this.txtTy_Gia.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
            this.txtTy_Gia.BackColor = System.Drawing.Color.White;
            this.txtTy_Gia.DisabledBackColor = System.Drawing.Color.Empty;
            this.txtTy_Gia.Font = new System.Drawing.Font("Arial", 8.25F);
            this.txtTy_Gia.ForeColor = System.Drawing.Color.Black;
            this.txtTy_Gia.Location = new System.Drawing.Point(724, 28);
            this.txtTy_Gia.Name = "txtTy_Gia";
            this.txtTy_Gia.NumericValue = new decimal(new int[] {
            0,
            0,
            0,
            0});
            this.txtTy_Gia.OldValue = null;
            this.txtTy_Gia.ReadOnly = true;
            this.txtTy_Gia.Size = new System.Drawing.Size(58, 20);
            this.txtTy_Gia.TabIndex = 7;
            this.txtTy_Gia.TextAlign = System.Windows.Forms.HorizontalAlignment.Right;
            this.txtTy_Gia.UserTextNumericFormat  = QMVnSoft.AppInstance.TextNumericFormat.ExchangeRate;
            this.txtTy_Gia.Value = ((object)(resources.GetObject("txtTy_Gia.Value")));
            // 
            // lblMa_Tte
            // 
            this.lblMa_Tte.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
            this.lblMa_Tte.AutoSize = true;
            this.lblMa_Tte.Font = new System.Drawing.Font("Arial", 8.25F);
            this.lblMa_Tte.Location = new System.Drawing.Point(652, 31);
            this.lblMa_Tte.Name = "lblMa_Tte";
            this.lblMa_Tte.Size = new System.Drawing.Size(39, 14);
            this.lblMa_Tte.TabIndex = 61;
            this.lblMa_Tte.Text = "Tiền tệ";
            // 
            // txtMa_Tte
            // 
            this.txtMa_Tte.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
            this.txtMa_Tte.CharacterCasing = System.Windows.Forms.CharacterCasing.Upper;
            this.txtMa_Tte.CheckTextSearched = false;
            this.txtMa_Tte.DisabledForeColor = System.Drawing.Color.Blue;
            this.txtMa_Tte.Font = new System.Drawing.Font("Arial", 8.25F);
            this.txtMa_Tte.InputMask = "USD,VND";
            this.txtMa_Tte.Location = new System.Drawing.Point(697, 28);
            this.txtMa_Tte.Name = "txtMa_Tte";
            this.txtMa_Tte.OldValue = null;
            this.txtMa_Tte.ReadOnly = true;
            this.txtMa_Tte.Size = new System.Drawing.Size(28, 20);
            this.txtMa_Tte.TabIndex = 6;
            this.txtMa_Tte.Text = "USD";
            this.txtMa_Tte.UserTextLength  = QMVnSoft.AppInstance.TextControlLength.None;
            this.txtMa_Tte.UserTrimMode  = QMVnSoft.AppInstance.TextControlTrimMode.Right;
            this.txtMa_Tte.Value = "USD";
            // 
            // FormCTNBViewer
            // 
            this.ClientSize = new System.Drawing.Size(794, 534);
            this.Controls.Add(this.txtMa_Tte);
            this.Controls.Add(this.txtTTien_Nt);
            this.Controls.Add(this.txtTy_Gia);
            this.Controls.Add(this.txtTTien);
            this.Controls.Add(this.grdDetail);
            this.Controls.Add(this.txtDesc_EN);
            this.Controls.Add(this.txtDien_Giai);
            this.Controls.Add(this.txtDia_Chi);
            this.Controls.Add(this.txtOng_Ba);
            this.Controls.Add(this.txtTen_Dt);
            this.Controls.Add(this.txtTen_Hd);
            this.Controls.Add(this.txtTen_Bp);
            this.Controls.Add(this.lblDesc_EN);
            this.Controls.Add(this.lblMa_Tte);
            this.Controls.Add(this.lblTTien_Nt);
            this.Controls.Add(this.txtMa_Dt);
            this.Controls.Add(this.lblDien_Giai);
            this.Controls.Add(this.lblDia_Chi);
            this.Controls.Add(this.lblOng_Ba);
            this.Controls.Add(this.lblMa_Dt);
            this.Controls.Add(this.txtMa_Hd);
            this.Controls.Add(this.lblMa_Hd);
            this.Controls.Add(this.txtMa_Bp);
            this.Controls.Add(this.lblMa_Bp);
            this.Name = "FormCTNBViewer";
            this.Controls.SetChildIndex(this.txtSo_Ct, 0);
            this.Controls.SetChildIndex(this.txtNgay_Ps, 0);
            this.Controls.SetChildIndex(this.txtNgay_Ct, 0);
            this.Controls.SetChildIndex(this.lblPhan_Loai, 0);
            this.Controls.SetChildIndex(this.txtMa_Loai1, 0);
            this.Controls.SetChildIndex(this.txtMa_Loai2, 0);
            this.Controls.SetChildIndex(this.txtMa_Loai3, 0);
            this.Controls.SetChildIndex(this.lblMa_Bp, 0);
            this.Controls.SetChildIndex(this.txtMa_Bp, 0);
            this.Controls.SetChildIndex(this.lblMa_Hd, 0);
            this.Controls.SetChildIndex(this.txtMa_Hd, 0);
            this.Controls.SetChildIndex(this.lblMa_Dt, 0);
            this.Controls.SetChildIndex(this.lblOng_Ba, 0);
            this.Controls.SetChildIndex(this.lblDia_Chi, 0);
            this.Controls.SetChildIndex(this.lblDien_Giai, 0);
            this.Controls.SetChildIndex(this.txtMa_Dt, 0);
            this.Controls.SetChildIndex(this.lblTTien_Nt, 0);
            this.Controls.SetChildIndex(this.lblMa_Tte, 0);
            this.Controls.SetChildIndex(this.lblDesc_EN, 0);
            this.Controls.SetChildIndex(this.txtTen_Bp, 0);
            this.Controls.SetChildIndex(this.txtTen_Hd, 0);
            this.Controls.SetChildIndex(this.txtTen_Dt, 0);
            this.Controls.SetChildIndex(this.txtOng_Ba, 0);
            this.Controls.SetChildIndex(this.txtDia_Chi, 0);
            this.Controls.SetChildIndex(this.txtDien_Giai, 0);
            this.Controls.SetChildIndex(this.txtDesc_EN, 0);
            this.Controls.SetChildIndex(this.grdDetail, 0);
            this.Controls.SetChildIndex(this.txtTTien, 0);
            this.Controls.SetChildIndex(this.txtTy_Gia, 0);
            this.Controls.SetChildIndex(this.txtTTien_Nt, 0);
            this.Controls.SetChildIndex(this.txtMa_Tte, 0);
            ((System.ComponentModel.ISupportInitialize)(this.grdDetail)).EndInit();
            this.ResumeLayout(false);
            this.PerformLayout();

        }

        internal override void OnResetControls()
        {
            base.DetailGridBrowser = this.grdDetail;
            int num = 0;
            if (base.AppInvoiceParameters.AllowDepartmentControl != 1)
            {
                num += this.txtMa_Hd.Top - this.txtMa_Bp.Top;
                this.lblMa_Bp.Visible = false;
                this.txtMa_Bp.Visible = false;
                this.txtTen_Bp.Visible = false;
            }
            if (base.AppInvoiceParameters.AllowContractControl != 1)
            {
                num += this.txtMa_Dt.Top - this.txtMa_Hd.Top;
                this.lblMa_Hd.Visible = false;
                this.txtMa_Hd.Visible = false;
                this.txtTen_Hd.Visible = false;
            }
            if (num != 0)
            {
                if (base.AppInvoiceParameters.AllowContractControl == 1)
                {
                    this.lblMa_Hd.Top -= num;
                    this.txtMa_Hd.Top -= num;
                    this.txtTen_Hd.Top -= num;
                }
                this.lblMa_Dt.Top -= num;
                this.txtMa_Dt.Top -= num;
                this.txtTen_Dt.Top -= num;
                this.lblOng_Ba.Top -= num;
                this.txtOng_Ba.Top -= num;
                this.lblDia_Chi.Top -= num;
                this.txtDia_Chi.Top -= num;
                this.lblDien_Giai.Top -= num;
                this.txtDien_Giai.Top -= num;
                this.lblDesc_EN.Top -= num;
                this.txtDesc_EN.Top -= num;
                base.DetailGridBrowser.Top = this.grdDetail.Top - num;
                base.DetailGridBrowser.Height = this.grdDetail.Height + num;
            }
            if (!base.AppInvoiceParameters.BilingualUsed)
            {
                this.lblDesc_EN.Visible = false;
                this.txtDesc_EN.Visible = false;
                this.txtDien_Giai.Width = (this.txtDesc_EN.Left + this.txtDesc_EN.Width) - this.txtDien_Giai.Left;
                this.txtDien_Giai.Anchor = AnchorStyles.Right | AnchorStyles.Left | AnchorStyles.Top;
            }
            if (base.AppInvoiceParameters.AllowDepartmentControl != 2)
            {
                base.DetailGridBrowser.Columns[2].Visible = false;
            }
            if (base.AppInvoiceParameters.AllowContractControl != 2)
            {
                base.DetailGridBrowser.Columns[3].Visible = false;
            }
            if (!AppInstance.LotNumberCtrl)
            {
                base.DetailGridBrowser.Columns[8].Visible = false;
            }
            if (!AppInstance.DeadLineCtrl)
            {
                base.DetailGridBrowser.Columns[9].Visible = false;
            }
            if (!AppInstance.QualityCtrl)
            {
                base.DetailGridBrowser.Columns[10].Visible = false;
            }
            if (!AppInstance.DampCtrl)
            {
                base.DetailGridBrowser.Columns[11].Visible = false;
            }
            if (!AppInstance.AlcoholCtrl)
            {
                base.DetailGridBrowser.Columns[12].Visible = false;
            }
            if (base.AppInvoiceParameters.FreeFields <= 0)
            {
                num = base.txtMa_Loai1.Top - this.txtTTien_Nt.Top;
                this.lblTTien_Nt.Top += num;
                this.txtTTien_Nt.Top += num;
                this.txtTTien.Top += num;
                base.DetailGridBrowser.Height = this.grdDetail.Height + num;
            }
            base.OnResetControls();
        }

        protected override void OnResize(EventArgs e)
        {
            base.OnResize(e);
            if (this.txtOng_Ba != null)
            {
                int num = base.ClientSize.Width - 0xcb;
                this.txtOng_Ba.Width = num / 2;
                this.txtDia_Chi.Left = (this.txtOng_Ba.Left + this.txtOng_Ba.Width) + 0x5c;
                this.txtDia_Chi.Width = num - this.txtOng_Ba.Width;
                this.lblDia_Chi.Left = (this.txtDia_Chi.Left - this.lblDia_Chi.Width) - 6;
                if ((base.AppInvoiceParameters != null) && base.AppInvoiceParameters.BilingualUsed)
                {
                    this.txtDien_Giai.Width = this.txtOng_Ba.Width;
                    this.txtDesc_EN.Left = this.txtDia_Chi.Left;
                    this.txtDesc_EN.Width = this.txtDia_Chi.Width;
                    this.lblDesc_EN.Left = (this.txtDesc_EN.Left - this.lblDesc_EN.Width) - 6;
                }
            }
        }

        internal override void OnShow()
        {
            base.OnShow();
            this.txtMa_Tte.Value = base.LocalMasterRow["Ma_Tte"];
            this.txtTy_Gia.Value = base.LocalMasterRow["Ty_Gia"];
            this.txtMa_Bp.Value = base.LocalMasterRow["Ma_Bp"];
            this.txtTen_Bp.Value = base.LocalMasterRow["Ten_Bp"];
            this.txtMa_Hd.Value = base.LocalMasterRow["Ma_Hd"];
            this.txtTen_Hd.Value = base.LocalMasterRow["Ten_Hd"];
            this.txtMa_Dt.Value = base.LocalMasterRow["Ma_Dt"];
            this.txtTen_Dt.Value = base.LocalMasterRow["Ten_Dt"];
            this.txtOng_Ba.Value = base.LocalMasterRow["Ong_Ba"];
            this.txtDia_Chi.Value = base.LocalMasterRow["Dia_Chi"];
            this.txtDien_Giai.Value = base.LocalMasterRow["Dien_Giai"];
            this.txtDesc_EN.Value = base.LocalMasterRow["Desc_EN"];
            this.txtTTien_Nt.Value = base.LocalMasterRow["TTien_Nt"];
            this.txtTTien.Value = base.LocalMasterRow["TTien"];
        }
    }
}

